#include<cstdio>
const int p=1000000007;
const maxn=510;
char a[maxn][maxn];
int main()
{
	freopen("test")

